package tests.org.nicta.learn.factorization.naiveFactorization;

import static org.junit.Assert.*;

import java.util.HashMap;

import org.junit.Before;
import org.junit.Test;
import org.nicta.learn.factorization.naiveFactorization.NaiveMF;

public class naiveFactorizationTest {

	NaiveMF mf;
	@Before 
	public void initialize()throws Exception{
		String ratingsFileLocation = "data/MovieLens/100K/u.data.t";
		mf = new NaiveMF(5, ratingsFileLocation,"100K");
	}
	
	@Test
	public void testnaiveFactorization() throws Exception{
		HashMap<Integer, Double> userAverage = 
				mf.getUserAverage(mf.itemUserRatings, mf.userRatedItems);
		mf.ratingNormalizationPerUserAverage(mf.ratings, userAverage);
		mf.factorize();
	}

}
